<?php defined('IN_HOPECMS') or exit('Access Denied'); ?>
<script type="text/javascript" src="{__PUBLIC__}script/tab.js"></script>
<script type="text/javascript">
$(function(){
	$('#tab .tab-title li').tab({
		content : '#tab .tab-content',
		style   : 'active'
	});
});
</script>
<form name="global" method="post">
	<div class="content-title">全局设置</div>
	<div id="tab">
		<div class="tab-title">
			<ul>
				<li class="li active">基本</li>
				<li class="li">伪静态</li>
				<li class="li">邮箱</li>
			</ul>
		</div>
		<div class="clear"></div>
		<div class="tab-content">
			<table class="table-input" cellpadding="0" border="0" cellspacing="0" width="100%">
				<tr>
					<td class="td-title">管理员邮箱：</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['admin_email'])): echo $set['admin_email']; endif;?>" name="admin_email" /></td>
					<td class="td-mark">网站出现问题时，向这个邮箱发送邮件</td>
				</tr>
				<tr>
					<td class="td-title">后台日志：</td>
					<td class="td-value">
						<input name="admin_log" type="radio" value="1" <?php echo (isset($set['admin_log']) && $set['admin_log'] == 1) ? 'checked="checked"' : ''; ?> />是
						<input name="admin_log" type="radio" value="0" <?php echo (isset($set['admin_log']) && $set['admin_log'] == 0) ? 'checked="checked"' : !isset($set['admin_log']) ? 'checked="checked"' : '' ; ?> />否
					</td>
					<td class="td-mark">记录管理员在后台的操作</td>
				</tr>
				<tr>
					<td class="td-title">删除文章同时删除附件：</td>
					<td class="td-value">
						<input name="delete_attac" type="radio" value="1" <?php echo (isset($set['delete_attac']) && $set['delete_attac'] == 1) ? 'checked="checked"' : ''; ?> />是
						<input name="delete_attac" type="radio" value="0" <?php echo (isset($set['delete_attac']) && $set['delete_attac'] == 0) ? 'checked="checked"' : !isset($set['delete_attac']) ? 'checked="checked"' : '' ; ?> />否
					</td>
					<td class="td-mark">删除文章的时候同时也删除相关的附件</td>
				</tr>
				<tr>
					<td class="td-title">后台最大登陆失败次数：</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['login_error_num'])): echo $set['login_error_num']; else: echo 5; endif;?>" name="login_error_num" /></td>
					<td class="td-mark">超过一定次数，将在15分钟内不可登陆</td>
				</tr>
				<tr>
					<td class="td-title">APP账号：</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['app_user'])): echo $set['app_user']; endif;?>" name="app_user" /></td>
					<td class="td-mark">通过HopeCMS应用商店下载应用的通行证</td>
				</tr>
				<tr>
					<td class="td-title">APP密码</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['app_pwd'])): echo $set['app_pwd']; endif;?>" name="app_pwd" /></td>
					<td class="td-mark">通行证密码</td>
				</tr>
			</table>
		</div>
		<div class="tab-content">
			<table class="table-input" cellpadding="0" border="0" cellspacing="0" width="100%">
				<tr>
					<td class="td-title" width="150">使用伪静态：</td>
					<td class="td-value">
						<input name="url_mode" type="radio" value="path" <?php echo (isset($set['url_mode']) && $set['url_mode'] == 'path') ? 'checked="checked"' : ''; ?> />是
						<input name="url_mode" type="radio" value="compatible" <?php echo (isset($set['url_mode']) && $set['url_mode'] == 'compatible') ? 'checked="checked"' : !isset($set['url_mode']) ? 'checked="checked"' : '' ; ?> />否
					</td>
					<td class="td-mark">是否使用伪静态，此模式需要开启rewirte</td>
				</tr>
				<tr>
					<td class="td-title" width="150">开启路由：</td>
					<td class="td-value">
						<input name="url_route" type="radio" value="1" <?php echo (isset($set['url_route']) && $set['url_route'] == '1') ? 'checked="checked"' : ''; ?> />是
						<input name="url_route" type="radio" value="0" <?php echo (isset($set['url_route']) && $set['url_route'] == '0') ? 'checked="checked"' : !isset($set['url_route']) ? 'checked="checked"' : '' ; ?> />否
					</td>
					<td class="td-mark">是否开启路由功能，此模式需要开启rewirte</td>
				</tr>
				<tr>
					<td class="td-title" width="150">路由后缀：</td>
					<td class="td-value">
						<input type="text" value="<?php if (isset($set['url_suffix'])): echo $set['url_suffix']; else: echo '.html'; endif;?>" name="url_suffix" />
					</td>
					<td class="td-mark">使用路由后的URL后缀</td>
				</tr>
				<tr>
					<td class="td-title" width="150">404错误文件：</td>
					<td class="td-value">
						<input type="text" value="<?php if (isset($set['file404'])): echo $set['file404']; endif;?>" name="file404" />
					</td>
					<td class="td-mark">指定404错误文件，当站点访问不存在的页面时会调用</td>
				</tr>
			</table>
		</div>
		<div class="tab-content">
			<table class="table-input" cellpadding="0" border="0" cellspacing="0" width="100%">
				<tr>
					<td class="td-title" width="150">邮件服务器：</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['smtp_server'])): echo $set['smtp_server']; endif;?>" name="smtp_server" /></td>
					<td class="td-mark">SMTP服务器地址</td>
				</tr>
				<tr>
					<td class="td-title" width="150">邮件发送端口：</td>
					<td class="td-value">
						<input type="text" value="<?php if (isset($set['smtp_port'])): echo $set['smtp_port']; else: echo 25; endif;?>" name="smtp_port" />
					</td>
					<td class="td-mark">SMTP服务器端口</td>
				</tr>
				<tr>
					<td class="td-title" width="150">发件人地址：</td>
					<td class="td-value"><input type="text" value="<?php if (isset($set['smtp_send_email'])): echo $set['smtp_send_email']; endif;?>" name="smtp_send_email" /></td>
					<td class="td-mark">SMTP发送邮箱</td>
				</tr>
				<tr>
					<td class="td-title" width="150">邮箱用户名：</td>
					<td class="td-value">
						<input type="text" value="<?php if (isset($set['smtp_user'])): echo $set['smtp_user']; endif;?>" name="smtp_user" />
					</td>
					<td class="td-mark">SMTP邮箱用户名</td>
				</tr>
				<tr>
					<td class="td-title" width="150">邮箱密码：</td>
					<td class="td-value">
						<input type="text" value="<?php if (isset($set['smtp_pwd'])): echo $set['smtp_pwd']; endif;?>" name="smtp_pwd" />
					</td>
					<td class="td-mark">SMTP邮箱密码</td>
				</tr>
				<tr>
					<td class="td-title" width="150">邮箱设置测试：</td>
					<td class="td-value">
						<input type="text" value="" name="try_email" />
					</td>
					<td class="td-mark"><input type="button" value="测试发送" class="button"/></td>
				</tr>
			</table>
		</div>
	</div>
</form>